package net.maku.module.query;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import net.maku.module.entity.AgThirdParty;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

@TableName("三方平台地址管理(AgThirdParty)参数类")
@Data
public class AgThirdPartyQuery implements Serializable {

    @Schema(description = "三方平台id")
    private Integer id;


    @Schema(description = "三方平台名称")
    private String name;


    @Schema(description = "三方平台图标地址")
    private String icon;


    @Schema(description = "三方平台二维码地址")
    private String qrCode;


    @Schema(description = "三方平台地址（预留字段")
    private String path;

    @Schema(description = "所属；1鞍钢官网 2博物馆")
    private Integer websiteId;

    public AgThirdParty makeCreateEntity(long executor) {
        AgThirdParty thirdParty = new AgThirdParty();
        BeanUtils.copyProperties(this, thirdParty);
        thirdParty.setCreator(executor);
        return thirdParty;
    }

    public AgThirdParty makeUpdateEntity(AgThirdParty thirdParty,
                                         long executor) {
        BeanUtils.copyProperties(this, thirdParty);
        thirdParty.setUpdater(executor);
        return thirdParty;
    }

}
